package com.mas.strategey;

import com.mas.resource.ResourceInfo;
import java.util.Arrays;

public class Proposal{

	/**
	 * Array of resource Infos
	 */	
	private ResourceInfo[] resourceInfos = null;

	/**
	 * The total price of the proposal
	 */
	private double price;

	/**
	 * @return the resourceInfos
	 * The resourceInfos of the proposal
	 */
	public ResourceInfo[] getResourceInfos() {
		return resourceInfos;
	}

	/**
	 * @param resourceInfos
	 * The resourceInfos to set
	 */
	public void setResourceInfos(ResourceInfo[] resourceInfos) {
		this.resourceInfos = resourceInfos;
	}

	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}

	/**
	 * @param price
	 *            the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}

	/**
	 * toString method: creates a String representation of the object
	 * 
	 * @return the String representation
	 */
	public String toString() {
		StringBuffer buffer = new StringBuffer();
		String EOL = "\n";
		buffer.append("Proposal[");
		if (resourceInfos == null) {
			buffer.append("resourceInfos = ").append("null").append(EOL);
		} else {
			buffer.append("resourceInfos = ").append(
					Arrays.asList(resourceInfos).toString()).append(EOL);
		}
		buffer.append("price = ").append(price).append(EOL);
		buffer.append("]");
		return buffer.toString();
	}

}
